import request from '@/utils/request'

export function login(account, password) {
  return request({
    url: '/login',
    method: 'post',
    data: {
      account,
      password,
    }
  })
}

export function getInfo() {
  return request({
    url: '/login/getUserInfo',
    method: 'get',
  })
}

export function logout() {
  return request({
    url: '/logout',
    method: 'post'
  })
}

/*获取用户权限列表
 * @param num adminId
 */
export function getMenuList(adminId) {
  return request({
    url: '/admin/menu/listByUser',
    method: 'post',
    data:{
    	adminId
    }
  })
}
